home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: strsplt.tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text, with CR line terminators
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[CR]
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [ttxt] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 73 74 72 73 70 6c 74 |\section|{strsplt|
|00000010| 20 2d 2d 2d 20 53 70 6c | 69 74 20 61 20 73 74 72 | --- Spl|it a str|
|00000020| 69 6e 67 7d 0d 5c 6c 61 | 62 65 6c 7b 66 6e 3a 73 |ing}.\la|bel{fn:s|
|00000030| 74 72 73 70 6c 74 7d 0d | 5c 69 6e 64 65 78 7b 73 |trsplt}.|\index{s|
|00000040| 74 72 73 70 6c 74 28 29 | 7d 0d 5c 69 6e 64 65 78 |trsplt()|}.\index|
|00000050| 7b 73 70 6c 69 74 20 61 | 20 73 74 72 69 6e 67 7d |{split a| string}|
|00000060| 0d 5c 69 6e 64 65 78 7b | 73 74 72 69 6e 67 73 21 |.\index{|strings!|
|00000070| 73 70 6c 69 74 74 69 6e | 67 7d 0d 5c 69 6e 64 65 |splittin|g}.\inde|
|00000080| 78 7b 65 6c 65 6d 65 6e | 74 73 20 6f 66 20 61 20 |x{elemen|ts of a |
|00000090| 73 74 72 69 6e 67 7d 0d | 5c 62 65 67 69 6e 7b 72 |string}.|\begin{r|
|000000a0| 61 69 6c 7d 0d 53 74 72 | 73 70 6c 74 20 3a 20 27 |ail}.Str|splt : '|
|000000b0| 73 74 72 73 70 6c 74 27 | 20 27 28 27 20 53 74 72 |strsplt'| '(' Str|
|000000c0| 69 6e 67 20 27 29 27 20 | 3b 0d 5c 65 6e 64 7b 72 |ing ')' |;.\end{r|
|000000d0| 61 69 6c 7d 0d 0d 5c 76 | 65 72 62 2b 73 74 72 73 |ail}..\v|erb+strs|
|000000e0| 70 6c 74 2b 20 74 61 6b | 65 73 20 61 20 63 68 61 |plt+ tak|es a cha|
|000000f0| 72 61 63 74 65 72 20 73 | 74 72 69 6e 67 20 61 73 |racter s|tring as|
|00000100| 20 69 6e 70 75 74 2c 20 | 61 6e 64 20 72 65 74 75 | input, |and retu|
|00000110| 72 6e 73 20 61 20 72 6f | 77 0d 6d 61 74 72 69 78 |rns a ro|w.matrix|
|00000120| 20 74 68 61 74 20 63 6f | 6e 74 61 69 6e 73 20 61 | that co|ntains a|
|00000130| 20 73 69 6e 67 6c 65 20 | 63 68 61 72 61 63 74 65 | single |characte|
|00000140| 72 20 73 74 72 69 6e 67 | 20 61 73 20 65 61 63 68 |r string| as each|
|00000150| 20 65 6c 65 6d 65 6e 74 | 2e 20 59 6f 75 0d 77 69 | element|. You.wi|
|00000160| 6c 6c 20 67 65 74 20 61 | 6e 20 65 72 72 6f 72 20 |ll get a|n error |
|00000170| 69 66 20 74 68 65 20 61 | 72 67 75 6d 65 6e 74 20 |if the a|rgument |
|00000180| 69 73 20 6e 6f 74 20 61 | 20 73 74 72 69 6e 67 2e |is not a| string.|
|00000190| 20 53 74 72 69 6e 67 20 | 6d 61 74 72 69 63 69 65 | String |matricie|
|000001a0| 73 0d 61 72 65 20 6e 6f | 74 20 61 6c 6c 6f 77 65 |s.are no|t allowe|
|000001b0| 64 20 61 73 20 69 6e 70 | 75 74 20 74 6f 20 5c 76 |d as inp|ut to \v|
|000001c0| 65 72 62 2b 73 74 72 73 | 70 6c 74 2b 2e 20 54 68 |erb+strs|plt+. Th|
|000001d0| 65 0d 72 65 73 75 6c 74 | 69 6e 67 20 6d 61 74 72 |e.result|ing matr|
|000001e0| 69 78 20 68 61 73 20 61 | 73 20 6d 61 6e 79 20 63 |ix has a|s many c|
|000001f0| 6f 6c 75 6d 6e 73 20 61 | 73 20 74 68 65 20 20 61 |olumns a|s the a|
|00000200| 72 67 75 6d 65 6e 74 20 | 68 61 64 0d 63 68 61 72 |rgument |had.char|
|00000210| 61 63 74 65 72 73 2e 20 | 0d 0d 0d 5c 70 61 72 61 |acters. |...\para|
|00000220| 67 72 61 70 68 7b 45 78 | 61 6d 70 6c 65 7d 0d 5c |graph{Ex|ample}.\|
|00000230| 69 6e 64 65 78 7b 65 78 | 61 6d 70 6c 65 20 6f 66 |index{ex|ample of|
|00000240| 20 73 74 72 73 70 6c 74 | 28 29 7d 0d 5c 69 6e 64 | strsplt|()}.\ind|
|00000250| 65 78 7b 73 74 72 73 70 | 6c 74 28 29 21 65 78 61 |ex{strsp|lt()!exa|
|00000260| 6d 70 6c 65 7d 0d 5c 62 | 65 67 69 6e 7b 76 65 72 |mple}.\b|egin{ver|
|00000270| 62 61 74 69 6d 7d 0d 3e | 20 73 74 72 69 6e 67 31 |batim}.>| string1|
|00000280| 20 3d 20 22 61 20 73 74 | 72 69 6e 67 22 0d 61 20 | = "a st|ring".a |
|00000290| 73 74 72 69 6e 67 0d 3e | 20 53 74 72 69 6e 67 4d |string.>| StringM|
|000002a0| 61 74 72 69 78 20 3d 20 | 73 74 72 73 70 6c 74 28 |atrix = |strsplt(|
|000002b0| 73 74 72 69 6e 67 31 29 | 0d 20 53 74 72 69 6e 67 |string1)|. String|
|000002c0| 4d 61 74 72 69 78 20 3d | 0d 61 20 20 20 20 20 73 |Matrix =|.a s|
|000002d0| 20 20 74 20 20 72 20 20 | 69 20 20 6e 20 20 67 20 | t r |i n g |
|000002e0| 20 0d 3e 20 73 68 6f 77 | 28 53 74 72 69 6e 67 4d | .> show|(StringM|
|000002f0| 61 74 72 69 78 29 0d 20 | 20 20 6e 61 6d 65 3a 20 |atrix). | name: |
|00000300| 20 20 20 20 20 53 74 72 | 69 6e 67 4d 61 74 72 69 | Str|ingMatri|
|00000310| 78 20 20 0d 20 20 20 63 | 6c 61 73 73 3a 20 20 20 |x . c|lass: |
|00000320| 20 20 73 74 72 69 6e 67 | 20 20 20 20 20 20 20 20 | string| |
|00000330| 0d 20 20 20 74 79 70 65 | 3a 20 20 20 20 20 20 73 |. type|: s|
|00000340| 74 72 69 6e 67 20 20 20 | 20 20 20 20 20 0d 20 20 |tring | . |
|00000350| 20 20 20 6e 72 3a 20 20 | 20 20 20 20 31 20 20 20 | nr: | 1 |
|00000360| 20 20 20 20 20 20 20 20 | 20 20 0d 20 20 20 20 20 | | . |
|00000370| 6e 63 3a 20 20 20 20 20 | 20 38 20 20 20 20 20 20 |nc: | 8 |
|00000380| 20 20 20 20 20 20 20 0d | 3e 20 73 74 72 73 70 6c | .|> strspl|
|00000390| 74 28 22 22 29 0d 20 20 | 20 20 20 20 20 20 5b 5d |t(""). | []|
|000003a0| 0d 3e 20 73 68 6f 77 28 | 20 73 74 72 73 70 6c 74 |.> show(| strsplt|
|000003b0| 28 22 22 29 29 0d 20 20 | 20 6e 61 6d 65 3a 20 20 |("")). | name: |
|000003c0| 20 20 20 20 4e 55 4c 4c | 20 20 20 20 0d 20 20 20 | NULL| . |
|000003d0| 63 6c 61 73 73 3a 20 20 | 20 20 20 73 74 72 69 6e |class: | strin|
|000003e0| 67 20 20 0d 20 20 20 74 | 79 70 65 3a 20 20 20 20 |g . t|ype: |
|000003f0| 20 20 73 74 72 69 6e 67 | 20 20 0d 20 20 20 20 20 | string| . |
|00000400| 6e 72 3a 20 20 20 20 20 | 20 30 20 20 20 20 20 20 |nr: | 0 |
|00000410| 20 0d 20 20 20 20 20 6e | 63 3a 20 20 20 20 20 20 | . n|c: |
|00000420| 30 20 20 20 20 20 20 20 | 0d 3e 20 73 74 72 73 70 |0 |.> strsp|
|00000430| 6c 74 28 32 35 2e 35 20 | 2b 20 34 6a 29 0d 72 6c |lt(25.5 |+ 4j).rl|
|00000440| 61 62 3a 20 73 74 72 73 | 70 6c 74 2c 20 4e 55 4c |ab: strs|plt, NUL|
|00000450| 4c 2c 20 77 72 6f 6e 67 | 20 74 79 70 65 20 6f 66 |L, wrong| type of|
|00000460| 20 61 72 67 20 74 6f 20 | 62 75 69 6c 74 2d 69 6e | arg to |built-in|
|00000470| 20 73 68 6f 75 6c 64 20 | 62 65 3a 20 53 54 52 49 | should |be: STRI|
|00000480| 4e 47 0d 3e 20 73 74 72 | 73 70 6c 74 28 22 32 35 |NG.> str|splt("25|
|00000490| 2e 35 20 2b 20 34 6a 22 | 29 0d 32 20 20 35 20 20 |.5 + 4j"|).2 5 |
|000004a0| 2e 20 20 35 20 20 20 20 | 20 2b 20 20 20 20 20 34 |. 5 | + 4|
|000004b0| 20 20 6a 20 0d 5c 65 6e | 64 7b 76 65 72 62 61 74 | j .\en|d{verbat|
|000004c0| 69 6d 7d 0d 0d 5c 6e 65 | 77 70 61 67 65 0d 0d 0d |im}..\ne|wpage...|
+--------+-------------------------+-------------------------+--------+--------+